<template>
  <div>
    <h3>我是子组件</h3>
    <p>我是子组件中的num: {{ aa }}-----{{ bb }}</p>
    <button @click="hClick">点我加一</button>
  </div>
</template>

<script>
export default {
  props: {
    aa: {
      type: Number,
      required: true
    },
    bb: {
      type: Number,
      required: true
    }
  },
  methods: {
    hClick() {
      this.$emit('update:aa', this.aa + 1)
      this.$emit('update:bb', this.bb + 1)
    }
  }
}
</script>

<style>

</style>
